package com.unionfetch.content_home.contract

import com.unionfetch.content_home.bean.AccountCount
import com.unionfetch.content_home.bean.AccountLeverInfo
import com.unionfetch.content_home.bean.DemoAccountInfo
import com.unionfetch.content_home.bean.LiveAccountInfo
import com.unionfetch.content_home.bean.request.AddDemoAccountRequest
import com.unionfetch.content_home.bean.request.AddLiveAccountRequest
import com.unionfetch.content_home.bean.request.ModifyDemoLeverRequest
import com.unionfetch.content_home.bean.request.ModifyLeverRequest
import com.unionftech.common.common.bean.SystemUserInfo
import com.unionftech.common.base.mvp.IBasePresenter
import com.unionftech.common.base.mvp.IBaseView
import com.unionftech.common.base.mvp.impl.IBaseCallBack
import com.unionftech.common.bean.ResponseResult
import okhttp3.RequestBody

interface AccountContract {
    interface ILiveTradeListView : IBaseView {
        fun handleUserLiveAccountList(result: ResponseResult<LiveAccountInfo>)
    }

    interface IDemoTradeListView : IBaseView {
        fun handleUserDemoAccountList(result: ResponseResult<DemoAccountInfo>)
    }

    interface IAddDemoAccountView : IBaseView {
        fun handleAddDemoAccount(response: ResponseResult<Any?>)
    }

    interface IAddLiveAccountView : IBaseView {
        fun handleAddLiveAccount(response: ResponseResult<Any?>)
    }

    interface IModifyLeverView : IBaseView {
        fun handleModifyLever(response: ResponseResult<Any?>)
    }

    interface ILeverInfoView : IBaseView {
        fun handleLeverInfo(response: ResponseResult<AccountLeverInfo>)
    }

    interface IAccountCountView : IBaseView {
        fun handleAccountCount(response: ResponseResult<AccountCount>)
    }

    interface IAccountPresenter : IBasePresenter {
        fun getUserLiveAccountList(token: String)
        fun getUserDemoAccountList(token: String)
        fun createDemoAccount(token: String, request: AddDemoAccountRequest)
        fun createLiveAccount(token: String, request: AddLiveAccountRequest)
        fun modifyLeverage(token: String, request: ModifyLeverRequest)
        fun modifyDemoLeverage(token: String, request: ModifyDemoLeverRequest)
        fun queryLeverage(token: String, tradeNo: String)
        fun queryAccountCount(token: String, userId: String)
    }

    interface IAccountModel {
        fun getUserLiveAccountList(
            token: String, callBack: IBaseCallBack<ResponseResult<LiveAccountInfo>>
        )

        fun getUserDemoAccountList(
            token: String, callBack: IBaseCallBack<ResponseResult<DemoAccountInfo>>
        )

        fun createDemoAccount(
            token: String,
            request: AddDemoAccountRequest,
            callBack: IBaseCallBack<ResponseResult<Any?>>
        )

        fun createLiveAccount(
            token: String,
            request: AddLiveAccountRequest,
            callBack: IBaseCallBack<ResponseResult<Any?>>
        )

        fun modifyLeverage(
            token: String,
            request: ModifyLeverRequest,
            callBack: IBaseCallBack<ResponseResult<Any?>>
        )

        fun modifyDemoLeverage(
            token: String,
            request: ModifyDemoLeverRequest,
            callBack: IBaseCallBack<ResponseResult<Any?>>
        )

        fun queryLeverage(
            token: String,
            tradeNo: String,
            callBack: IBaseCallBack<ResponseResult<AccountLeverInfo>>
        )

        fun queryAccountCount(
            token: String,
            userId: String,
            callBack: IBaseCallBack<ResponseResult<AccountCount>>
        )
    }
}